import { instance } from "../utils/request";
const getOrdersPagination = async (params) => {
  return await instance.get("/Orders/AdminPagination", params);
};

const addOrders = async (data) => {
  return await instance.post("/Orders/Add", data);
};

const updateOrders = async (data) => {
  return await instance.post("/Orders/Update", data);
};

const getOrdersDetail = async (id) => {
  return await instance.get("/Orders/Detail", { id: id });
};

const deleteOrders = async (id) => {
  return await instance.post("/Orders/Delete", { id: id });
};

const ordersApi = {
  getOrdersPagination,
  addOrders,
  updateOrders,
  getOrdersDetail,
  deleteOrders,
};

export default ordersApi;
